import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:laos_mall/common/style/app_style.dart';


class DropdownButton2Widget<T> extends DropdownButton2<T> {
  DropdownButton2Widget({super.key, required super.items,super.onChanged,this.menuItemStyle,super.buttonStyleData,super.hint});
  final MenuItemStyleData? menuItemStyle;
  @override
  State<DropdownButton2Widget<T>> createState() =>
      _DropdownButton2WidgetState<T>();
}

class _DropdownButton2WidgetState<T> extends State<DropdownButton2Widget<T>> {
  @override
  Widget build(BuildContext context) {

    return DropdownButton2(
      items: widget.items,
      iconStyleData: IconStyleData(icon: Icon(Icons.keyboard_arrow_down,color: AppColor.textColor,)),
      onChanged: widget.onChanged,
      buttonStyleData: widget.buttonStyleData ?? const ButtonStyleData(
          // width: double.infinity
          width: 500
      ),
      hint: widget.hint,
      menuItemStyleData: widget.menuItemStyle ?? const MenuItemStyleData(
          height: 40,
          padding: EdgeInsets.zero
      ),


    );
  }
}
